package com.easymin.weixin.entity;

import java.util.Date;

/**
 * 子分类
 *
 * @author Administrator
 */
public class Intent extends BaseEntity {
  private Long categoryId; // 主分类Id

  private String category_name;// 主分类名称

  private String name;// 分类名称

  private String alias;// 别名

  private static final long serialVersionUID = 1L;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Long getCategoryId() {
    return categoryId;
  }

  public void setCategoryId(Long categoryId) {
    this.categoryId = categoryId;
  }

  public String getCategory_name() {
    return category_name;
  }

  public void setCategory_name(String category_name) {
    this.category_name = category_name == null ? null : category_name.trim();
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name == null ? null : name.trim();
  }

  public String getAlias() {
    return alias;
  }

  public void setAlias(String alias) {
    this.alias = alias == null ? null : alias.trim();
  }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }

  public Date getUpdated() {
    return updated;
  }

  public void setUpdated(Date updated) {
    this.updated = updated;
  }

  public Integer getVersion() {
    return version;
  }

  public void setVersion(Integer version) {
    this.version = version;
  }

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    Intent other = (Intent) that;
    return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
        && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId()
            .equals(other.getCategoryId()))
        && (this.getCategory_name() == null ? other.getCategory_name() == null : this
            .getCategory_name().equals(other.getCategory_name()))
        && (this.getName() == null ? other.getName() == null : this.getName().equals(
            other.getName()))
        && (this.getAlias() == null ? other.getAlias() == null : this.getAlias().equals(
            other.getAlias()))
        && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(
            other.getCreated()))
        && (this.getUpdated() == null ? other.getUpdated() == null : this.getUpdated().equals(
            other.getUpdated()))
        && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(
            other.getVersion()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
    result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
    result = prime * result + ((getCategory_name() == null) ? 0 : getCategory_name().hashCode());
    result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
    result = prime * result + ((getAlias() == null) ? 0 : getAlias().hashCode());
    result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
    result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
    result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append(" [");
    sb.append("Hash = ").append(hashCode());
    sb.append(", id=").append(id);
    sb.append(", categoryId=").append(categoryId);
    sb.append(", category_name=").append(category_name);
    sb.append(", name=").append(name);
    sb.append(", alias=").append(alias);
    sb.append(", created=").append(created);
    sb.append(", updated=").append(updated);
    sb.append(", version=").append(version);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append("]");
    return sb.toString();
  }
}
